package cn.pengpeng.dmp.utils

import java.util.Properties

import com.typesafe.config.ConfigFactory

/**
  * Created by root on 2018/12/4.
  */
object ConfigHandler {
    //加载所有的conf文件进行解析
    private lazy val config = ConfigFactory.load()

  // parquet 文件所在的路径
  private val parquetPath: String = config.getString("parquet.path")

  //关于mysql的配置
  val dirver: String = config.getString("db.driver")
  val url: String = config.getString("db.url")
  val user: String = config.getString("db.user")
  val passwd: String = config.getString("db.password")
  //疯转mysql props
  val dbProps = new Properties()
  dbProps.setProperty("driver",dirver)
  dbProps.setProperty("user",user)
  dbProps.setProperty("password",passwd)


  val logdataAnalysis_table : String = config.getString("db.logdataAnalysis.table")
  val areaAnalysis_table = config.getString("db.areaAnalysis.table")

  val logdataAnalysisResultJsonPath:String = config.getString("rpt.logdataAnalysis")

  // redis
  val redisHost = config.getString("redis.host")
  val redisPort = config.getInt("redis.port")
  val redisdbIndex = config.getInt("redis.index")




}
